<template>
  <div>
    <a-form>
      <a-result
        title='操作成功'
        :is-success='true'
        sub-title='请等待审核通过'
        style='max-width: 560px; margin: 40px auto 0;'>
        <div class='information'>
          <a-row>
            <a-col :sm='8' :xs='24'>提交人：</a-col>
            <a-col :sm='16' :xs='24'>{{ responseData.authorName}}</a-col>
          </a-row>
          <a-row>
            <a-col :sm='8' :xs='24'>题目名称：</a-col>
            <a-col :sm='16' :xs='24'>{{ responseData.title}}</a-col>
          </a-row>
          <a-row>
            <a-col :sm='8' :xs='24'>提交时间：</a-col>
            <a-col :sm='16' :xs='24'>{{ responseData.createTime }}</a-col>
          </a-row>
        </div>
        <template #extra>
          <a-button
            type='primary'
            @click='finish'>再出一题
          </a-button>
          <a-button
            style='margin-left: 8px'
            @click='toTopicDetail(responseData.topicId)'>查看题目
          </a-button>
          <a-button
            type='primary'
            style='margin-left: 8px'
            @click='toIndex'>回到首页
          </a-button>
        </template>
      </a-result>
    </a-form>
  </div>
</template>

<script>
export default {
  name: 'Step3',
  props: {
    responseData: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      loading: false
    }
  },
  methods: {
    finish() {
      window.location.reload()
      this.$emit('finish')
    },
    toOrderList() {
      this.$router.push('/topic/list')
    },
    toTopicDetail(topicId) {
      this.$router.push(`/reply/question?topicId=${topicId}&mode=reply`)
    },
    toIndex(){
    
    }
  }
}
</script>
<style lang='less' scoped>
.information {
  line-height: 22px;
  
  .ant-row:not(:last-child) {
    margin-bottom: 24px;
  }
}

.money {
  font-family: "Helvetica Neue", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 14px;
}
</style>
